<template>
  <div class="centreLeft1">
    <div class="bg-color-black">
      <div class="d-flex pt-2 pl-2">
        <span>
<!--          <i class="iconfont icon-tongji4" />-->
        </span>
        <div class="d-flex">
          <span class="fs-xl text mx-2 title-size">课程Top6</span>
<!--          <dv-decoration-3 class="dv-dec-3" />-->
        </div>
      </div>
      <div class="d-flex jc-center">
        <chart ref="courseTopNBarRef"/>
<!--        <dv-capsule-chart :config="config" style="width:300px;height:200px" />-->
      </div>
      <!-- 4个主要的数据 -->
<!--      <div class="bottom-data">
        <div
          class="item-box mt-2"
          v-for="(item, index) in numberData"
          :key="index"
        >
        </div>
      </div>-->
    </div>
  </div>
</template>

<script lang="ts" setup>
import { ref } from 'vue'
import Chart from './chart/index'

const courseTopNBarRef = ref()

const setData = (data: any) => {
  courseTopNBarRef.value.setCourseTop6Data(data)
  // console.log('rateLine_index.vue','& rateLineChart.value',rateLineChart.value);
}

defineExpose({
  setData
})
</script>

<style lang="scss" scoped>
//$box-width: 470px;
$box-height: 240px;

.centreLeft1 {
  padding: 16px;
  height: $box-height;
  //width: $box-width;
  border-radius: 10px;
  .bg-color-black {
    height: $box-height - 30px;
    border-radius: 10px;
  }
  .text {
    color: #c3cbde;
  }
  .dv-dec-3 {
    position: relative;
    width: 100px;
    height: 20px;
    top: -3px;
  }
  .title-size{
    font-size: 10px;
  }
  .bottom-data {
    .item-box {
      & > div {
        padding-right: 5px;
      }
      font-size: 14px;
      float: right;
      position: relative;
      width: 50%;
      color: #d3d6dd;
      .dv-digital-flop {
        width: 120px;
        height: 30px;
      }
      i {
        font-size: 20px;
        line-height: 30px;
        margin-left: 20px;
      }
      .colorYellow {
        color: yellowgreen;
      }
      p {
        text-align: center;
      }
    }
  }
}
</style>
